<template>
	<view class="">
		<div class="homebj">
		    <!-- 热门青年之家 -->
		    <div class="homermqnzj">
		        <div class="homermqnzjall" style="margin: 15px 15px 0px 0px" v-if="datas.length > 0">
		            <div class="homermqnzjlist" v-for="(el,ind) in datas" @click="dwxqclick(el.id)">
		                <div class="homermqnzjleft">
		                    <img :src="getImg('noimg.png')" class="rmqnzjimg1" v-if="el.typeImg == ''">
		                    <img :src="getImg1(el.typeImg)" class="rmqnzjimg1" v-if="el.typeImg != ''">
		                </div>
		                <div class="homermqnzjright">
		                    <div class="homermqnzjname">{{el.name}}</div>
		                    <div class="dwxqmsdes" style="margin: 15px 0px 0px 0px;">地址：{{el.place}}</div>
		                    <div class="sy-dianhua" style="margin: 15px 0px 0px 0px;">电话：{{el.phone}}</div>
		                </div>
		            </div>
		        </div>
		        <div style="text-align: center;font-size: 14px;" v-if="datas.length == 0">暂无场馆数据</div>
		    </div>
		</div>
	</view>
</template>

<script>
	import web from '../../components/utils/request.js';
	export default {
		data() {
			return {
				dwDatas: [],//创办过活动的单位列表
				datas: [],//所有的单位列表
				labdatas: [],//标签数据
				longitude: '120.223073',//当前经度
				latitude: '30.185294',//当前维度
				num: 7,
			}
		},
		onLoad(options) {

		},
		onReady() {
			this.getData1();
		},
		methods: {
			getImg(url) {
				return 'https://ruianm.tour-ma.com/r/cms/www/m/huodong/img/' + url;
			},
			getImg1(url) {
				return 'https://ruianm.tour-ma.com' + url;
			},
			getData1(){
				var url = "/venues.jspx";
				var arg = {pageNo:1,num:1000,hdtype: 1};
				var that = this;
				web.httpPost(that, url, arg, function(res) {
					that.datas = res.data.data;
				})
			},
			dwxqclick: function(id) {//点击进入详情页
				uni.navigateTo({
					url:'./cgyd?id='+ id+"&book_time="
				})
			}
		}
	}
</script>

<style>
	@import url("@/components/css/datascss.css");
</style>
